﻿@model ServeNHL.Models.VCLViewModel
@{
    ViewBag.Title = "VCLForm";
    Layout = "~/Views/Shared/_Layout.cshtml";
    int memberCounter = 0;
}

<div class="row">
    <div class="spacer7"></div>
    <div class="header col-lg-12 col-md-12 col-sm-12 col-xs-12 ">

        <div class="signupLogo">Volunteer Control List Form</div>
    </div>
</div>
@using (Html.BeginForm("SaveVCL", "Events", "POST"))
{
    <input type="hidden" value="@Html.Raw(Model.VCL.VCL_ID)" />
    <div class="spacer6"></div>
    <div class="row">
        <div class="former1 col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <label for="list_desc">List Description: </label>
        </div>
        <div class="former2 col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <input type="text" name="list_desc" id="list_desc" value="@Html.Raw(Model.VCL.LIST_DESC)">
            <br />
        </div>
    </div>

    <div class="row">
        <div class="former1 col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <label for="status">Status: </label>
        </div>
        <div class="former2 col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <select name="status" id="status">
                <option value="">Please Select</option>
                <option value="Active" @Html.Raw((Model.VCL.STATUS == "Active") ? "selected=\"selected\"" : "")>Active</option>
                <option value="Inactive" @Html.Raw((Model.VCL.STATUS == "Inactive") ? "selected=\"selected\"" : "")>Inactive</option>
            </select>
            <br />
        </div>
    </div>

    <div class="row">
        <div class="former1 col-lg-6 col-md-6 col-sm-6 col-xs-6">
            <div id="VCLMembers" class="listBox">
                <label>Members of List</label>

                @foreach (var member in Model.VCLMembers)
                {
                    <div class="memberListItem" data-member-id="@Html.Raw(member.VCL_MEMBER_ID)">
                        <input type="checkbox" value="1" checked="checked" class="memberListItemCheckbox" id="@Html.Raw("memberList_" + memberCounter + "_" + member.VCL_MEMBER_ID)" />
                    </div>
                    memberCounter++;
                }
            </div>
        </div>
    </div>
    <div class="spacer3"></div>
    <div class="row">
        <div class="former3  col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <input type="button" id="addMember" value="Add Member" />
            <br />
        </div>
    </div>
    <div class="spacer3"></div>
    <input type="hidden" id="totalMembers" value="@Html.Raw(memberCounter)" />
                    <div class="spacer3"></div>
                    <div class="row">
                        <div class="former3  col-lg-12 col-md-12 col-sm-12 col-xs-12">
                            <input type="submit" value="Save List" />
                        </div>
                    </div>
}

<div id="searchUsers">
    <input type="hidden" name="searchUserCount" value="0" />
    <input type="button" id="addNewAutocomplete" value="Add Another User" />
</div>
